<text>Four-byte ΓÇ£OSTypeΓÇ¥ codes are used heavily through the Macintosh system. Usually they consist of four printable characters, but this is not guaranteed. For this reason these externals support OSType values in two forms: either as a string of up to four literal characters (blank-padded at the end if fewer than four), or as a string of exactly eight hexadecimal digits. Values may be returned in either form, as four literal characters where possible, otherwise as eight hex digits.</text>
</content>
<name></name>
<script></script>
</card>
card_4806.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">inds a unique resource ID in a given resource file, where ResFile is the resource file to which the resource will be added, and TheType is the </span><span class="style2">OSType</span><span class="style1"> which will be assigned to the resource.The function result is a new unique resource ID, which will be greater than zero, but could be less than 128.</span></text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(ResFile, TheType)</text>
</content>
<name></name>
<script></script>
</card>
card_7062.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>removes a resource from a resource file, where ResFile is the resource file from which to remove the resource, and TheResource is the handle to the resource to remove.</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>ResFile, TheResource</text>
</content>
<name></name>
<script></script>
</card>
card_4361.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>reallocates a handle, where TheHandle is the handle to reallocate, and NewSize is the new size in bytes. On success, the block is made non-purgeable, to forestall possible interactions with HyperCardΓÇÖs own memory-allocation activities.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603539</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>TheHandle, NewSize</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_12313.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>puts a block of data specified in string literal form, where Addr is the starting address to write to, and TheData is the data to be written, as a literal string. The number of bytes written equals the length of this string.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2805555372</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>Addr, TheData</text>
</content>
<name></name>
<script></script>
</card>
card_9167.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>puts a block of data specified in hexadecimal literal form, where Addr is the starting address to write to, and TheData is the data to be written, as a hexadecimal string with an even number of digits. The number of bytes written is half the length of this string.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603772</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>Addr, TheData</text>
</content>
<name></name>
<script></script>
</card>
card_59556.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>opens a resource file for subsequent operations, where FileName is the name of the file to open, ReadWrite is true to open the file for modification, false to open for reading only (default is false), and NoResLoad is true to prevent automatic preloading of resources (default is false).On success, the function result is the resource file refnum, or the empty string if the resource file is already open. The current resource file remains unchanged.</text>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799604355</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(FileName, [ReadWrite], [NoResLoad])</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_11668.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>allocates a new memory pointer, where Size is an unsigned integer specifying the number of bytes to allocate, Clear is true to zero out the block (default is false), and UseSysHeap is true to allocate the block in the system heap (default is false, ignored unless MultiFinder is running).On success, the function result is the new pointer.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799604248</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(Size, [Clear], [UseSysHeap])</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_6499.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>allocates a new memory handle, where Size is an unsigned integer specifying the number of bytes to allocate, Clear is true to zero out the block (default is false), and UseSysHeap is true to allocate the block in the system heap (default is false, ignored unless MultiFinder is running).On success, the function result is the new handle.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603295</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(Size, [Clear], [UseSysHeap])</text>
</content>
<name></name>
<script></script>
</card>
card_7457.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>reloads a purged resource into memory, where TheHandle is the handle to reload. On success, the resource is made non-purgeable, to forestall potential interactions with HyperCardΓÇÖs own memory-allocation activities.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799604526</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>TheHandle</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_5905.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>makes a memory handle purgeable, where TheHandle is the handle to affect. Note that the block could be purged from memory almost immediately, depending on HyperCardΓÇÖs memory-allocation activities.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603445</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>TheHandle</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_8178.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>returns the home resource file for a resource, where TheHandle is a resource handle. The function result is the integer refnum of the containing resource file.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799604590</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(TheHandle)</text>
</content>
<name></name>
<script></script>
</card>
card_9376.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>makes a memory handle nonpurgeable, where TheHandle is the handle to affect. Note that the block could already have been purged from memory if it was previously purgeable, depending on HyperCardΓÇÖs memory-allocation activities.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603829</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>TheHandle</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_5649.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>dereferences a memory handle, where TheHandle is the handle to dereference.The function result is a StripAddressΓÇÖd pointer to the relocatable memory block, which should have been locked down previously.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603163</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(TheHandle)</text>
</content>
<name></name>
<script></script>
</card>
card_4090.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">eads a resource from a resource file, where ResFile is a resource file refnum, ResType and ResID are the </span><span class="style2">OSType</span><span class="style1"> type and integer ID of the resource to read from the file, and UseSysHeap is true to load the resource into the system heap if running under MultiFinder (default is false).On success, the function result is the resource handle. The handle is made nonpurgeable, to avoid unexpected interactions with HyperCardΓÇÖs use of memory (just in case).</span></text>
<text>returns a refnum for an already-open resource file, where FileName is the name of the file to open, ReadWrite is true to open the file for modification, false to open for reading only (omit to accept whatever permissions are allowed), and NoResLoad is true to prevent automatic preloading of resources (default is false).On success, the function result is the resource file refnum, or the empty string if the resource file is not already open. The current resource file remains unchanged.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799604424</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(FileName, [ReadWrite], [NoResLoad])</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_9754.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">eads a resource from a resource file, where ResFile is a resource file refnum, ResType and ResName are the </span><span class="style2">OSType</span><span class="style1"> type and name of the resource to read from the file, and UseSysHeap is true to load the resource into the system heap if running under MultiFinder (default is false).On success,tThe function result is the resource handle, marked nonpurgeable, to avoid unexpected interactions with HyperCardΓÇÖs use of memory (just in case).</span></text>
<text>returns a block of data in string literal form, where Addr is the starting address to read from, and NrBytes is the number of bytes to read.The function result is a literal string with a length equal to NrBytes, containing the data read from that memory location.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2805555087</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(Addr, NrBytes)</text>
</content>
<name></name>
<script></script>
</card>
card_10205.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">eturns one of the types of resources in a resource file, where RefNum is a resource file refnum, and Index is a value in the range [1 .. </span><span class="style2">CountTypes</span><span class="style1">(RefNum)].The function result is the specified entry in the list of types of resources in the file, as an </span><span class="style2">OSType</span><span class="style1">.</span></text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799604669</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(RefNum, Index)</text>
</content>
<name></name>
<script></script>
</card>
card_12871.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">eads a resource from a resource file, where ResFile is a resource file refnum, ResType and Index are the </span><span class="style2">OSType</span><span class="style1"> type and index number of the resource to read from the file, and UseSysHeap is true to load the resource into the system heap if running under MultiFinder (default is false).On success, the function result is the resource handle. The handle is made nonpurgeable, to avoid unexpected interactions with HyperCardΓÇÖs use of memory (just in case).</span></text>
<text>returns the size of a handle, where TheHandle is an unsigned integer representing a handle address.The function result is the size in bytes of the space occupied by the relocatable block.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603020</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(TheHandle)</text>
</content>
<name></name>
<script></script>
</card>
card_8721.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>returns a block of data in hexadecimal literal form, where Addr is the starting address to read from, and NrBytes is the number of bytes to read.The function result is a hexadecimal string with a number of digits twice the value of NrBytes, containing the data read from that memory location.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603752</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(Addr, NrBytes)</text>
</content>
<name></name>
<script></script>
</card>
card_11896.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">reates a new resource file, where ResFileName is the name of the file to create, and FileType and FileCreator are the </span><span class="style2">OSType</span><span class="style1"> file type and creator codes to give the file. If DeleteExisting is true, an existing file with the same name is deleted, otherwise an error is returned if the file already exists.</span></text>
<text>counts the number of resource types in a resource file, where RefNum is a file refnum previously returned from OpenResFile.The function result is the number of different types of resources in the file.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603648</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(RefNum)</text>
</content>
<name></name>
<script></script>
</card>
card_9638.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">ounts the number of resources of a specified type in a resource file, where RefNum is a resource file refnum, and TheType is the resource type to look for, as an </span><span class="style2">OSType</span><span class="style1">. The function result is the number of resources of that type in the file.</span></text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603941</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>(RefNum, TheType)</text>
</content>
<name></name>
<script></script>
</card>
card_2899.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>copies a block of data, where SrcAddr is the address to copy from, DstAddr is the address to copy to, and NrBytes is the number of bytes to copy. The source and destination blocks may overlap.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>10</id>
<text>2799603723</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text>SrcAddr, DstAddr, NrBytes</text>
</content>
<name></name>
<script></script>
</card>
card_11084.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>returns a list of the refnums of all currently-open resource files, one to a line, beginning with the topmost (most recently opened) file in the chain.</text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_4163.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">dds a resource to a resource file, where TheResFile is the refnum of the resource file to which to add the resource, TheResource is the handle to turn into a resource handle (it mustnΓÇÖt already be one), TheResType is the </span><span class="style2">OSType</span><span class="style1"> type, TheResID the ID and ResName the name to give the resource, and ResAttributes is an integer representing the resource attributes to set.</span></text>